import { Rule } from "./types";

export const Flake8LoggingFormatRuleList: Rule[] = [
    {
        code: "G001",
        name: "logging-string-format",
        descEn: "Logging statement uses string.format()",
        descCn: "",
        autoFix: false,
    },
    {
        code: "G002",
        name: "logging-percent-format",
        descEn: "Logging statement uses %",
        descCn: "",
        autoFix: false,
    },
    {
        code: "G003",
        name: "logging-string-concat",
        descEn: "Logging statement uses +",
        descCn: "",
        autoFix: false,
    },
    {
        code: "G004",
        name: "logging-f-string",
        descEn: "Logging statement uses f-string",
        descCn: "",
        autoFix: false,
    },
    {
        code: "G010",
        name: "logging-warn",
        descEn: "Logging statement uses warn instead of warning",
        descCn: "",
        autoFix: true,
    },
    {
        code: "G101",
        name: "logging-extra-attr-clash",
        descEn: "Logging statement uses an extra field that clashes with a LogRecord field: {key}",
        descCn: "",
        autoFix: false,
    },
    {
        code: "G201",
        name: "logging-exc-info",
        descEn: "Logging .exception(...) should be used instead of .error(..., exc_info=True)",
        descCn: "",
        autoFix: false,
    },
    {
        code: "G202",
        name: "logging-redundant-exc-info",
        descEn: "Logging statement has redundant exc_info",
        descCn: "",
        autoFix: false,
    },
];